package com.br.android.widing.adapter;

import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseExpandableListAdapter;

public class ExpandableListAdapter extends BaseExpandableListAdapter {

	private String[] groups = {"Alimenta��o", "Casa", "Combust�vel", "Lazer", "Entretenimento"};
	private String[][] childs = {{"Restaurante", "Fast-food", "Cyber-caf�", "Lanches"},
								 {"�gua", "Luz", "Telefone", "Internet", "TV por assinatura", "G�s"},
								 {"Gasolina", "�lcool", "Diesel", "G�s"},
								 {"Baladas", "Bebidas", "Futebol"},
								 {"Jogos", "Filmes", "Cinema"}};
	
	@Override
	public Object getChild(int group, int child) {
		return childs[group][child];
	}

	@Override
	public long getChildId(int arg0, int arg1) {
		return arg1;
	}

	@Override
	public View getChildView(int arg0, int arg1, boolean arg2, View arg3,
			ViewGroup arg4) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public int getChildrenCount(int groupPosition) {
		return childs[groupPosition].length;
	}

	@Override
	public Object getGroup(int groupPosition) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public int getGroupCount() {
		return groups.length;
	}

	@Override
	public long getGroupId(int groupPosition) {
		// TODO Auto-generated method stub
		return groupPosition;
	}

	@Override
	public View getGroupView(int groupPosition, boolean isExpanded,
			View convertView, ViewGroup parent) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public boolean hasStableIds() {
		// TODO Auto-generated method stub
		return true;
	}

	@Override
	public boolean isChildSelectable(int groupPosition, int childPosition) {
		return true;
	}

}
